M291 S4 R"Filament Sensor 0" P"Select an option:" K{"Enable", "Disable"} H1

if input = 0
    ; Enable Sensor 0
    echo >"0:/user/filamentsensor0.g" "M591 P1 C""io8.in"" S1 D0 ; Enable filament sensor 0 monitoring"
    M591 P1 C"io8.in" S1 D0
    echo "Sensor 0 Enabled"
elif input = 1
    ; Disable Sensor 0
    echo >"0:/user/filamentsensor0.g" "M591 P1 C""io8.in"" S0 D0 ; Disable filament sensor 0 monitoring"
    M591 P1 C"io8.in" S0 D0
    echo "Sensor 0 Disabled"